/*
 * @Author: HeAo
 * @Date: 2021-09-27 14:50:48
 * @LastEditTime: 2021-09-27 15:08:11
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \web2103-2105\web2105\3-1-ES6\day03\4-迭代器.js
 * 别乱动！
 */
let arr = ['tom', 'larry', 'jacky']
let keys = arr.keys()
let values = arr.values()
let entries = arr.entries()

// console.log(keys, values, entries);

// console.log(values.next());
// console.log(values.next());
// console.log(values.next());
// console.log(values.next());

// for of循环的实现（重构） 
// let item;
// while (!(item = values.next()).done) {
//   console.log(item.value);
// }

for (let entry of entries) {
  console.log(entry);
}


